(function(){
	
	//4.1购买商品
	var user_a = require("./3.用户注册与登录").user_a;
	var bus_a = require("./3.用户注册与登录").bus_a;
	//查找商品
	var goods = bus_a.getGoodsByName("小包包");
	if (goods) {
		//下订单
		var ach_id = user_a.makeAch(goods._id);
		//支付订单
		var pa_id = user_a.payAch(ach_id);
		//等待第三方接口触发回调
		setTimeout(function(){
			var PayAchCon = require("../pay_ach/_con");
			var pa = PayAchCon.get(pa_id);
			pa.endPayAch();
		}, 200);
	}

	module.exports = {
		bus_a:bus_a,
		user_a:user_a
	};
}());
